<?php
/**
 * Dependency display dot version action
 *
 * PHP version 5
 *
 * @category  W
 * @package   Services
 * @author    Olivier Hoareau <olivier@phppro.fr>
 * @copyright 2009 PHPPRO http://www.phppro.fr
 * @license   http://dev.phppro.fr/license PHPPRO
 * @version   SVN: $Id:$
 * @link      http://dev.phppro.fr/projects/wdependency
 */
require_once 'W/Dependency/Action/Abstract.php';
require_once 'W/Dependency/Exception/Stop.php';
/**
 * Dependency display dot version action
 *
 * @category  W
 * @package   Services
 * @author    Olivier Hoareau <olivier@phppro.fr>
 * @copyright 2009 PHPPRO http://www.phppro.fr
 * @license   http://dev.phppro.fr/license PHPPRO
 * @version   SVN: $Id$
 * @link      http://dev.phppro.fr/projects/wdependency
 */
class W_Dependency_Action_DisplayDotVersion extends W_Dependency_Action_Abstract
{
    /**
     * Process the action
     *
     * @param array|null $options the options
     *
     * @return string 'STOP' ?
     */
    public function execute($options=null)
    {
        $return = 0;
        $output = array();
        exec('dot -V 2>&1',$output,$return);
        echo join(PHP_EOL,$output);
        throw new W_Dependency_Exception_Stop();
    }
}